import 'dart:convert';
import 'dart:io';

import 'package:huxiaodui/api/model/mobile_app_model.dart';
import 'package:huxiaodui/store/store.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:uuid/v4.dart';

class SetBackstagePositioning{
  static const String _key = "IsBackstagePositioning";
  static Future<void> open() async {
    await Store.prefs.setBool(_key, true);
  }

  static Future<void> close() async {
    await Store.prefs.setBool(_key, false);
  }
  static Future<void> negate() async {
    await Store.prefs.setBool(_key, !(await get()));
  }
  static Future<bool> get() async {
    await Store.reload();
    return Store.prefs.getBool(_key) ?? false;
  }
}